---

helmDefaults:
  cleanupOnFail: true
  wait: true
  waitForJobs: true

releases:
  - name: cilium
    namespace: kube-system
    chart: oci://ghcr.io/home-operations/charts-mirror/cilium
    version: 1.18.4
    values: ['./templates/values.yaml.gotmpl']

  - name: coredns
    namespace: kube-system
    chart: oci://ghcr.io/coredns/charts/coredns
    version: 1.45.0
    values: ['./templates/values.yaml.gotmpl']
    needs: ['kube-system/cilium']

  #% if spegel_enabled %#
  - name: spegel
    namespace: kube-system
    chart: oci://ghcr.io/spegel-org/helm-charts/spegel
    version: 0.5.1
    values: ['./templates/values.yaml.gotmpl']
    needs: ['kube-system/coredns']
  #% endif %#

  - name: cert-manager
    namespace: cert-manager
    chart: oci://quay.io/jetstack/charts/cert-manager
    version: v1.19.1
    values: ['./templates/values.yaml.gotmpl']
    #% if spegel_enabled %#
    needs: ['kube-system/spegel']
    #% else %#
    needs: ['kube-system/coredns']
    #% endif %#

  - name: flux-operator
    namespace: flux-system
    chart: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator
    version: 0.36.0
    values: ['./templates/values.yaml.gotmpl']
    needs: ['cert-manager/cert-manager']

  - name: flux-instance
    namespace: flux-system
    chart: oci://ghcr.io/controlplaneio-fluxcd/charts/flux-instance
    version: 0.36.0
    values: ['./templates/values.yaml.gotmpl']
    needs: ['flux-system/flux-operator']
